<?php
require_once 'dao/AbstractDAO.php';

class ObserverUpdateDataDAO extends AbstractDAO{
	private static $TABLE = "OBSERVER_UPDATE_DATA";
	
	public function insertObserverUpdateData($observerUpdateDataId, $serviceId, $requestId, $paramsJson, $expireTime){
		$values = array();
		$values["OBSERVER_UPDATE_DATA_ID"] = $observerUpdateDataId;
		$values["SERVICE_ID"] = $serviceId;
		$values["REQUEST_ID"] = $requestId;
		$values["PARAMS_JSON"] = $paramsJson;
		$values["EXPIRE_TIME"] = $expireTime;
		
		return $this->insert(ObserverUpdateDataDAO::$TABLE, $values);
	}
	
	public function selectObserverUpdateData($observerUpdateDataId){
		return $this->selectOne(ObserverUpdateDataDAO::$TABLE, "*", "OBSERVER_UPDATE_DATA_ID = '$observerUpdateDataId'");
	}
	
	public function selectMaxObserverUpdateDataId(){
		return $this->selectMax(ObserverUpdateDataDAO::$TABLE, "OBSERVER_UPDATE_DATA_ID");
	}
}
?>